<?php 
include('fonctions.php');

$page = 'tableau-de-bord';
if(isset($_GET['page']))
{
    if(!empty($_GET['page']))
    {
        $page = $_GET['page'];
    }
}

$rep = 'pages';
$file = $rep .'/'. $page .'.php';
$file_tete = $rep .'/page-tete.php';
$file_pied = $rep .'/page-pied.php';
$file_vide = $rep .'/page-vide.php';

include_once($file_tete);
if(is_file($file))
{
    include($file);
}
else
{
    include($file_vide);
}
include_once($file_pied);
?>